package com.zjdiepu.www.manage.api.third;

import javax.annotation.Resource;

import org.apache.commons.lang.StringUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.zjdiepu.www.base.BaseController;
import com.zjdiepu.www.ibiz.file.IQiniuFileService;
import com.zjdiepu.www.model.third.request.NoticeRequest;

@RestController
@RequestMapping(value = "QiniuNoticeController", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public class QiniuNoticeController extends BaseController{
	@Resource
	private IQiniuFileService qiniuFileService;
	/**
	 * 七牛通知
	 * @param operationStatus
	 * @param fileName
	 * @return
	 */
	@RequestMapping("notice")
	public void notice(@RequestBody NoticeRequest noticeRequest, @RequestParam(required = false) String id) {
		if(null != noticeRequest && StringUtils.isNotBlank(id)) {
			qiniuFileService.saveNotice(noticeRequest, id);
		}
		return;
	}
}
